package Deme1;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * User: wenxiwen
 * Date: 2022/4/10
 * Time: 20:23
 * Description: No Description
 */
class Student implements Cloneable{
    public String name;
    public int age;
    public double scare;

    public void fun() {
        System.out.println("这是一个成员方法");
    }


    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", scare=" + scare +
                '}';
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}

public class TestDemo {
    public static void main(String[] args) throws CloneNotSupportedException {

          Student student = new Student();
          Student student1 = (Student)student.clone();

        System.out.println(student1);

    }
    public static void main1(String[] args) {
        String[] str = new String[3];
        str[0] = "wenxiwen";
        str[1] = "wenxiwen1";
        str[2] = "wenxiwen2";
        String[] str1 = str.clon
        System.out.println(Arrays.toString(str1));

      /*  Student student = new Student();
        Student student1 = student.clone();*/
    }
}